package com.fpd.enums;

/**
 * 状态枚举
 *
 * @author Monster
 */
public enum StateEnum {
	WSH(0, "未提交"),
	SHZ(3, "审核中"),
	AGREE(1, "通过"),
	DEFINE(2, "驳回");

    private int value;
    private String name;

    StateEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getNameByValue(int value) {
        for (StateEnum ate : StateEnum.values()) {
            if (value == ate.getValue()) {
                return ate.getName();
            }
        }
        return "";
    }
}
